<template>
  <el-input
    v-model="thisValue"
    :placeholder="placeholder"
    :clearable="clearable"
    :disabled="disabled"
    :show-password="password"
    @input="onInput"
  />
</template>

<script lang="ts" setup>
interface Input {
  type?: string;
  thisValue: number | string;
  placeholder?: string;
  clearable?: boolean;
  disabled?: boolean;
  password?: boolean;
  size?: "medium" | "small " | " mini";
}
const props = withDefaults(defineProps<Input>(), {
  thisValue: "",
  type: "text",
  placeholder: "请输入",
  clearable: false,
  disabled: false,
  password: false,
  size: "small ",
});
const emit = defineEmits<{
  (e: "update:thisValue", value: string | number): void;
}>();

const onInput = (value: string | number): void => {
  emit("update:thisValue", value);
};
</script>

<style lang="scss" scoped>
:deep(.el-input__suffix-inner ){
  display: flex;
  align-items: center;
}
</style>
